﻿/*----------------------------------------------------------------
//  <copyright file="IClientHttpCrypto.cs" company="MicroCloud@151504200868">
//      Copyright © 2020-2024 MicroCloud Corporation, All rights reserved.
//  </copyright>
//  <site>https://gitee.com/chenmm123/microclouds</site>
//  <last-editor>cmm</last-editor>
//  <last-date>2022-11-14 16:34</last-date>
//----------------------------------------------------------------*/

namespace MicroCloud.Http
{
    #region "Http客户端加密解密功能接口"
    /// <summary>
    /// Http客户端加密解密功能接口
    /// </summary>
    public interface IClientHttpCrypto
    {
        #region "方法"
        #region "将要发往服务器的请求进行加密"
        /// <summary>
        /// 将要发往服务器的请求进行加密
        /// </summary>
        /// <param name="request">未加密的请求</param>
        /// <returns>加密后的请求</returns>
        Task<HttpRequestMessage> EncryptRequest(HttpRequestMessage request);
        #endregion
        #region "解密从服务器收到的响应"
        /// <summary>
        /// 解密从服务器收到的响应
        /// </summary>
        /// <param name="response">加密的响应</param>
        /// <returns>解密后的响应</returns>
        Task<HttpResponseMessage> DecryptResponse(HttpResponseMessage response);
        #endregion

        #endregion

    }
    #endregion

}
